package com.erp.base.business.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.erp.base.base.CrudService;
import com.erp.base.business.dao.ExpertUserDao;
import com.erp.base.business.entity.ExpertUser;

@Service
public class ExpertUserService extends CrudService<ExpertUserDao, ExpertUser, Long> {

	public ExpertUser getApplyStatus(Long userId) {
		return dao.findByUserId(userId);
	}

	public List<ExpertUser> findByCustomSort(Long serverId, Long userId, String order) {
		return dao.findByCustomSort(serverId,userId,order);
	}
	
	public boolean hasApply(Long userId){
		return dao.findByUserId(userId)!=null;
	}
	
	public List<ExpertUser> findExperts(){
		return dao.findExperts();
	}
}
